{include file="file:$admin_theme_global_path/_header.tpl"
	masthead=$page_title pageTitle=$page_title current="pageparts_admin_listcontent"}
<div class="grid_13">
	<div class="grid_16 breadcrumb alpha omega">
		<a href="{url}/pageparts/admin/index{/url}">{t}Site Content{/t}</a>
		&raquo;
		<a href="{url}/pageparts/admin/listparts/page_id/{$pagepart.page_id}{/url}">{$pagepart.category_name} - {$pagepart.page_title}</a>
		&raquo;
		{$pagepart.name}
	</div>
</div>
{if !isset($drafts)}
	<div class="grid_3">
		<a href="{url}/pageparts/admin/editcontent/part_id/{$pagepart.id}/version/-1{/url}"
			class="button large">{t}Create New Version{/t}</a>
	</div>
{/if}
<div class="grid_16">
	&nbsp;
</div>

{if !isset($drafts) and !isset($versions)}
	<div class="grid_16">
		{t}No versions of this content exist yet. Click the &quot;Create New Version&quot; button to get started.{/t}
	</div>
{/if}

{if isset($drafts)}
	<div class="grid_16">
		<div class="grid_16 faux-thead alpha omega">
			<div class="grid_9 alpha">{t}Version Not Yet Published{/t}</div>
			<div class="grid_2">{t}Author{/t}</div>
			<div class="grid_2 center">{t}Version{/t}</div>
			<div class="grid_3 omega">{t}Last Updated{/t}</div>
		</div>
		{foreach from=$drafts item=version key=index}
			<div class="grid_16{if ($index + 1) mod 2 eq 0} even{else} odd{/if} faux-tr alpha omega">
				<div class="grid_9 alpha">
					<a href="{url}/pageparts/admin/editcontent/part_id/{$version.part_id}/version/{$version.version}{/url}">
						{$version.category_name} - {$version.page_title} - {$version.part_name}</a>
				</div>
				<div class="grid_2">{$version.last_modified_by_username}</div>
				<div class="grid_2 center">{$version.version}</div>
				<div class="grid_3 omega">{$version.last_modified_on}</div>
			</div>
		{/foreach}
	</div>

	<div class="grid_16">
		&nbsp;
	</div>
{/if}

{if isset($versions)}
	<div class="grid_16">
		<div class="grid_16 faux-thead alpha omega">
			<div class="grid_9 alpha">{t}Previously Published Versions of This Content{/t}</div>
			<div class="grid_2">{t}Author{/t}</div>
			<div class="grid_2 center">{t}Version{/t}</div>
			<div class="grid_3 omega">{t}Last Updated{/t}</div>
		</div>
		{foreach from=$versions item=version key=index}
			<div class="grid_16{if ($index + 1) mod 2 eq 0} even{else} odd{/if} faux-tr alpha omega">
				<div class="grid_9 alpha">
					<a href="{url}/pageparts/admin/viewcontent/part_id/{$version.part_id}/version/{$version.version}{/url}">
						{$version.category_name} - {$version.page_title} - {$version.part_name}</a>
				</div>
				<div class="grid_2">{$version.last_modified_by_username}</div>
				<div class="grid_2 center">{$version.version}</div>
				<div class="grid_3 omega">{$version.last_modified_on}</div>
			</div>
		{/foreach}
	</div>
{/if}

{include file="file:$admin_theme_global_path/_footer.tpl"}
